<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>AutoMenu</title>
        <h:outputStylesheet name="default.css" library="css" />
        <script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
        <script type="text/javascript">
            var geocoder;
            function codeAddress(endereco) {
                
                var latlng = new google.maps.LatLng(-23.4301513, -51.94012989999999);
                var mapOptions = {
                    zoom: 14,
                    center: latlng,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                }
                map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
                geocoder = new google.maps.Geocoder();
                geocoder.geocode( { 'address': endereco}, function(results, status) {
                    if (status == google.maps.GeocoderStatus.OK) {
                        map.setCenter(results[0].geometry.location);
                        var marker = new google.maps.Marker({
                            map: map,
                            position: results[0].geometry.location
                        });
                    } else {
                        alert('Endereço não encontrado no Google Maps: ' + status);
                    }
                });
            }
            PrimeFaces.locales['br'] = {
                closeText: 'fechar',
                prevText: 'anterior',
                nextText: 'próximo',
                currentText: 'corrente',
                monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
                monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
                dayNames: ['Domingo','Segunta','Terça','Quarta','Quinta','Sexta','Sábado'],
                dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
                dayNamesMin: ['D','S','T','Q','Q','S','S'],
                weekHeader: 'Se',
                firstDay: 1,
                isRTL: false,
                showMonthAfterYear: false,
                yearSuffix: '',
                timeOnlyTitle: 'Horário',
                timeText: 'Horário',
                hourText: 'Hora',
                minuteText: 'Minuto',
                secondText: 'Segundo',
                ampm: false,
                month: 'Mês',
                week: 'Semana',
                day: 'Dia',
                allDayText : 'O dia todo'
            };
            
            
            
            function mascaraMonetaria(arg) {
                //Set up the NumberMasks
                var separadorDecimal = ".";
                var separadorMilhar = ",";
                        
                var formato = new NumberParser(2, separadorDecimal, separadorMilhar, true);
                formato.currencySymbol = "R$";
                formato.useCurrency = true;
                formato.allowNegative = false;
                formato.currencyInside = true;
                                        
                if (arg.className.indexOf('mascaraMonetaria') == -1){
                    var mascaraMonetariaFinal = new NumberMask(formato, arg, 20);
                    mascaraMonetariaFinal.leftToRight = true;
                    arg.setAttribute('autocomplete','off');
                    arg.className += ' mascaraMonetaria';                        
                }
            }

        </script>  

    </h:head>
    <h:body style="font-size: 12px">
        <h:form id="formularioMenu">
            <div id="menu">
                <ui:insert id="men" name="menu">
                    <p:menubar>  
                        <p:menuitem value="Principal" url="/faces/index.xhtml" icon="ui-icon-home" />  
                        <p:submenu label="Cadastros" icon="ui-icon-document">  
                            <p:menuitem value="Categorias" url="/faces/admin/cadcategoria/lista.xhtml" />
                            <p:menuitem value="SubCategorias" url="/faces/admin/cadsubcategoria/lista.xhtml" />
                            <p:menuitem value="Caixa" url="/faces/admin/cadcaixa/lista.xhtml" />
                            <p:menuitem value="Cliente" url="/faces/admin/cadcliente/lista.xhtml" />
                            <p:menuitem value="Forma de Pagamento" url="/faces/admin/cadformadepagamento/lista.xhtml" />
                            <p:menuitem value="Funcionario" url="/faces/admin/cadfuncionario/lista.xhtml" />
                            <p:menuitem value="Garrafa" url="/faces/admin/cadgarrafa/lista.xhtml" />
                            <p:menuitem value="Matéria Prima" url="/faces/admin/cadmateriaprima/lista.xhtml" />
                            <p:menuitem value="Menu" url="/faces/admin/cadmenu/lista.xhtml" />
                            <p:menuitem value="Mesa" url="/faces/admin/cadmesa/lista.xhtml" />
                            <p:menuitem value="Pizza" url="/faces/admin/cadpizza/lista.xhtml" />
                            <p:menuitem value="Tamanho de Pizza" url="/faces/admin/cadpizzatamanho/lista.xhtml" />
                            <p:menuitem value="Produto" url="/faces/admin/cadproduto/lista.xhtml" />
                            <p:menuitem value="Rodizio" url="/faces/admin/cadrodizio/lista.xhtml" />
                        </p:submenu>  
                        <p:menuitem value="Sair" url="/sair.jsp"  icon="ui-icon-close" />  
                    </p:menubar>  
                </ui:insert>
            </div>
        </h:form>
        <div>
            <div id="left">
                <ui:insert name="left"> </ui:insert>
            </div>
            <div>
                <div id="corpo">
                    <ui:insert name="topo">
                    </ui:insert>
                    <ui:insert name="corpo">
                    </ui:insert>
                </div>
            </div>
        </div>
        <div id="bottom">
            <ui:insert name="Rodapé">
            </ui:insert>
        </div>
    </h:body>
</html>
